
import ModuleView from './ModuleView'
import _ from 'underscore'

var PageView = ModuleView.extend({
  type: "PageView",

  className: "PageView mui-scroll-wrapper",


  // 同时解析传递过来的参数供其他部分使用
  route: function(options) {

    // call post route callback
    this.postRoute(options);
  },
  // 路由完成之后执行的方法，在这里参数已经获取成功，可以在这里获取参数执行初始化填充动作
  postRoute: function(options) {

  },
  setRouteParam: function (options, path) {
    this.params = {};
    _.extend(this.params, options);
    path && this.navigate(path);
  },
  getRouteParam: function () {
    return this.params || null
  },
  clearRouteParam: function () {
    this.params = null;
  },
  //page enter dom
  onResume: function () {

  },
  navigate: function (path) {
    window.location.href = "#" + path;
  }

})





export default  PageView
